﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes.actions {
    import Engine.Helpers.*;
    import Classes.*;
    import Classes.sim.*;

    public class ActionNavigateHotspots extends ActionNavigateBeeline {

        protected var m_targetResource:MapResource;

        public function ActionNavigateHotspots(_arg1:NPC, _arg2:MapResource, _arg3:Vector3=null){
            super(_arg1, _arg2.getHotspot(), _arg3);
            this.m_targetResource = _arg2;
        }
        override protected function updatePath():void{
            var _local1:Vector3;
            if (m_source == null){
                m_source = m_npc.getPosition();
            };
            m_npc.setPosition(m_source.x, m_source.y);
            m_path = [];
            for each (_local1 in this.m_targetResource.getHotspots()) {
                m_path.push(new PathElement(_local1, null, PathElement.TYPE_NONROAD));
            };
            debugPrintPath();
        }

    }
}//package Classes.actions 
